<?php
/**
 * Created by PhpStorm.
 * @author: 汤文辉
 * @since:2017/6/13 13:31
 * 用于显示图书详情
 */
    include_once 'config/mysqlconfig.php';
    include 'class/Book.php';
    $book_id = $_GET['id'];
    $b = new Book($con);

    if($book_id && $con){
        $book = $b->getBookInfo($book_id);  //获得图书信息
        $comment = $b->getComment($book_id);    //获得图书评论信息
    }

    $i = 0;
    $b_id = $b->RandId();
    foreach ($b_id as $id) {
        if( $i<15 && $id){
            $rbook[$i] = $b->getBookInfo($id);//获得图书信息
        }else
            break;
        ++$i;
    }
    $con->close();

